﻿using Common.Communication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Device.Interfaces
{
    public interface IDianYuan:IDevice
    {
        /// <summary>
        /// 设置输出电压
        /// </summary>
        /// <param name="vol">电压</param>
        /// <param name="cur">电流</param>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<bool> SetOn(double vol, double cur = 0, int channel = 1);
        /// <summary>
        /// 关闭输出
        /// </summary>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<bool> SetOff(int channel = 1);
        /// <summary>
        /// 采集电压
        /// </summary>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<double> GetVoltage(int channel = 1);
        /// <summary>
        /// 采集电流
        /// </summary>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<double> GetCurrent(int channel = 1);
        /// <summary>
        /// 采集功率
        /// </summary>
        /// <param name="channel">通道</param>
        /// <returns></returns>
        Result<double> GetPower(int channel = 1);
    }
}
